﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Moonwish.Core.DataAccess
{
    public interface IDataAccess<T>
    {
        /// <summary>
        /// 新增。
        /// </summary>
        /// <param name="items"></param>
        /// <param name="userId"></param>
        void Add(List<T> items, string userId);

        /// <summary>
        /// 编辑。
        /// </summary>
        /// <param name="items"></param>
        /// <param name="userId"></param>
        void Update(List<T> items, string userId);

        /// <summary>
        /// 删除。
        /// </summary>
        /// <param name="ids"></param>
        /// <param name="userId"></param>
        void Delete(List<string> ids, string userId);

        /// <summary>
        /// 查询。
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        List<T> Query(Request request);
    }
}
